// scaup - Scala up!
// (c) 2008-2010, Normen Müller, normen.mueller@gmail.com  
// $Id: Regex.scala 47 2010-01-12 20:22:35Z normen.mueller $
package scaup.util.matching

/** This class extends
 *  <code><a href="http://www.scala-lang.org/docu/files/api/scala/util/matching/Regex.html">Regex</a></code>
 *  by match flags, a bit mask that may include
 *  <code>
 *    <a href="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html#CASE_INSENSITIVE">CASE_INSENSITIVE</a>
 *  </code>,
 *  <code>
 *    <a href="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html#MULTILINE">MULTILINE</a>
 *  </code>,
 *  <code>
 *    <a href="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html#DOTALL">DOTALL</a>
 *  </code>,
 *  <code>
 *    <a href="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html#UNICODE_CASE">UNICODE_CASE</a>
 *  </code>, and
 *  <code>
 *    <a href="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html#CANON_EQ">CANON_EQ</a>
 *  </code>.
 * 
 * @param regex
 * @param flags
 * @param groupNames
 * @author <a href="mailto:normen.mueller@googlemail.com">Normen M&#xFC;ller</a>
 * @version 0.0.3
 * @see scala.util.matching.Regex
 * @see java.util.regex.Pattern */
class Regex(regex: String, flags: Int, groupNames: String*) extends scala.util.matching.Regex(regex, groupNames: _*) {
  import java.util.regex.Pattern
  
  /** @todo document */
  def this(regex: String, groupNames: String*) = this(regex, 0, groupNames: _*)
  
  /** The compiled pattern */
  override val pattern = Pattern.compile(regex, flags)
}
